// var o;
// var i;
// var r;
// var a;
// var s;
// var c;
// var l;
// var u;
// var p;
// var f;
// var d;
// var h;
// exports.GameEvent = exports.Define = void 0;
// (r = o = exports.Define || (exports.Define = {})).GAME_NAME = "AL_GAME_HUA";
// r.SCENE = ["AL_GAME_HUA_Loading", "AL_GAME_HUA_Main", "AL_GAME_HUA_Game"];
// r.MAIN_UI_MOVE_SPEED = 1500;
// r.Margin = {
//     left: 5,
//     right: 5,
//     top: 160,
//     bottom: 280
// };
// r.getWidth = function () {
//     return cc.winSize.width - r.Margin.left - r.Margin.right;
// };
// r.getHeight = function () {
//     return cc.winSize.height - r.Margin.top - r.Margin.bottom;
// };
// r.getCenter = function () {
//     return (r.Margin.bottom - r.Margin.top) / 2;
// };
// r.LATTICE_WIDTH = 200;
// r.LATTICE_HEIGHT = 210;
// r.MIN_LATTICE_WIDTH = 200;
// r.MIN_lATTICE_HEIGHT = 210;
// r.MAX_LATTICE_HEIGHT = 250;
// r.LATTICE_POS = [cc.v2(0, -50), cc.v2(0, -44), cc.v2(0, -50)];
// r.LATTICE_ANGLE = [25, 0, -25];
// r.ELEMET_FADA_TIME = 0.6;
// (h = r.GameState || (r.GameState = {}))[(h.PREPARE = 0)] = "PREPARE";
// h[(h.PLAYING = 1)] = "PLAYING";
// h[(h.PAUSE = 2)] = "PAUSE";
// h[(h.WIN = 3)] = "WIN";
// h[(h.FAIL = 4)] = "FAIL";
// (d = r.LevelType || (r.LevelType = {}))[(d.NORMAL = 0)] = "NORMAL";
// d[(d.CHALLENGE = 1)] = "CHALLENGE";
// d[(d.SPECIAL = 2)] = "SPECIAL";
// (f = r.LatticeType || (r.LatticeType = {}))[(f.NORMAL = 0)] = "NORMAL";
// f[(f.NULL = 1)] = "NULL";
// f[(f.SINGLE = 2)] = "SINGLE";
// f[(f.VIDEO = 3)] = "VIDEO";
// f[(f.LOCK = 4)] = "LOCK";
// (p = r.LatticePosType || (r.LatticePosType = {}))[(p.LEFT = 0)] = "LEFT";
// p[(p.CENTER = 1)] = "CENTER";
// p[(p.RIGHT = 2)] = "RIGHT";
// (u = r.LatticeState || (r.LatticeState = {}))[(u.PROGRESS = 0)] = "PROGRESS";
// u[(u.COMPLETED = 1)] = "COMPLETED";
// u[(u.NULL = 2)] = "NULL";
// (l = r.ElementShowType || (r.ElementShowType = {}))[(l.ACTIVE = 0)] = "ACTIVE";
// l[(l.GRAY = 1)] = "GRAY";
// l[(l.HIDE = 2)] = "HIDE";
// (c = r.AwardType || (r.AwardType = {}))[(c.LEVEL = 0)] = "LEVEL";
// c[(c.CHALLENGE = 1)] = "CHALLENGE";
// c[(c.SPECIAL = 2)] = "SPECIAL";
// c[(c.STAR = 3)] = "STAR";
// r.TOUCH_MOVE_LIMIT = 10;
// r.FINGER_OFFSET = 0;
// r.CHALLENGE_DATE_SIGN = 1699941588208;
// (s = r.RANK_ID || (r.RANK_ID = {}))[(s.TODAY = 33)] = "TODAY";
// s[(s.YESTERDAY = 34)] = "YESTERDAY";
// s[(s.WEEKLY = 31)] = "WEEKLY";
// s[(s.LASTWEEK = 32)] = "LASTWEEK";
// s[(s.MEDAL = 35)] = "MEDAL";
// (a = r.SHARE_LOCATION || (r.SHARE_LOCATION = {})).LOGIN = "login";
// a.RESULT = "result";
// a.RANK = "rank";
// a.HOME = "home";
// a.INVITE = "invite";
// a.REWARD = "reward";
// (i = exports.GameEvent || (exports.GameEvent = {})).ADD_STAR_NUM = o.GAME_NAME + "_ADD_STAR_NUM";
// i.CHANGE_PROP_NUM = o.GAME_NAME + "_CHANGE_PROP_NUM";
// i.CHANGE_AWARD_NUM = o.GAME_NAME + "_CHANGE_AWARD_NUM";
// i.CHANGE_STAR_BOX = o.GAME_NAME + "_CHANGE_STAR_BOX";
// i.ON_COIN_CHANGE = o.GAME_NAME + "_ON_COIN_CHANGE";
// i.ON_GAME_PAUSE = o.GAME_NAME + "_ON_GAME_PAUSE";
// i.ON_GAME_RESUME = o.GAME_NAME + "_ON_GAME_RESUME";
// i.CHANGE_SHOP_USE = o.GAME_NAME + "_CHANGE_SHOP_USE";
// i.CHANGE_SPECIAL_AWARD = o.GAME_NAME + "_CHANGE_SPECIAL_AWARD";
// i.ON_VIT_CHANGE = o.GAME_NAME + "_ON_VIT_CHANGE";
// i.ONLINE_GIFT_UNLOCK = o.GAME_NAME + "_ONLINE_GIFT_UNLOCK";
// i.ON_BANK_MONEY_CHANGE = o.GAME_NAME + "_ON_BANK_MONEY_CHANGE";
// i.ON_MISSION_CHANGE = o.GAME_NAME + "_ON_MISSION_CHANGE";
// i.ON_GAME_CLUB_HIDE = o.GAME_NAME + "_ON_GAME_CLUB_HIDE";
// i.ON_FREE_COIN_RECIEVE = o.GAME_NAME + "_ON_FREE_COIN_RECIEVE";
// i.REFRESH_EMAIL_LIST = o.GAME_NAME + "_REFRESH_EMAIL_LIST";
// i.ON_NOADS_CHANGE = o.GAME_NAME + "_ON_NOADS_CHANGE";
// i.ON_VIP_CHANGE = o.GAME_NAME + "_ON_VIP_CHANGE";
// i.ON_PAY_SUCCESS = o.GAME_NAME + "_ON_PAY_SUCCESS";
// i.ON_FEED_BACK_HIDE = o.GAME_NAME + "_ON_FEED_BACK_HIDE";
// i.REFRESH_INVITE_LIST = o.GAME_NAME + "_REFRESH_INVITE_LIST";
// i.ON_DAILY_SHARE_REFRESH = o.GAME_NAME + "_ON_DAILY_SHARE_REFRESH";
// i.ON_SUBSCRIBE_REFRESH = o.GAME_NAME + "_ON_SUBSCRIBE_REFRESH";
// i.ON_GAME_CLUB_REFRESH = o.GAME_NAME + "_ON_GAME_CLUB_REFRESH";
// i.ON_SWITCH_PAGE = o.GAME_NAME + "_ON_SWITCH_PAGE";
// i.ON_GAME_THEME_CHANGE = o.GAME_NAME + "_ON_GAME_THEME_CHANGE";


// 定义游戏的配置和事件
exports.GameEvent = exports.Define = void 0;

// Define模块
const Define = exports.Define || (exports.Define = {});

// 游戏名称
Define.GAME_NAME = "AL_GAME_HUA";

// 场景名称
Define.SCENE = ["AL_GAME_HUA_Loading", "AL_GAME_HUA_Main", "AL_GAME_HUA_Game"];

// 主界面移动速度
Define.MAIN_UI_MOVE_SPEED = 1500;

// 外边距定义
Define.Margin = {
    left: 5,
    right: 5,
    top: 160,
    bottom: 280
};

// 获取除去外边距后的宽度
Define.getWidth = function () {
    return cc.winSize.width - Define.Margin.left - Define.Margin.right;
};

// 获取除去外边距后的高度
Define.getHeight = function () {
    return cc.winSize.height - Define.Margin.top - Define.Margin.bottom;
};

// 获取中心点
Define.getCenter = function () {
    return (Define.Margin.bottom - Define.Margin.top) / 2;
};

// 棋盘格相关宽高
Define.LATTICE_WIDTH = 200;
Define.LATTICE_HEIGHT = 210;
Define.MIN_LATTICE_WIDTH = 200;
Define.MIN_lATTICE_HEIGHT = 210;
Define.MAX_LATTICE_HEIGHT = 250;

// 棋盘格位置和角度数据
Define.LATTICE_POS = [cc.v2(0, -50), cc.v2(0, -44), cc.v2(0, -50)];
Define.LATTICE_ANGLE = [25, 0, -25];

// 元素动画时间
Define.ELEMET_FADA_TIME = 0.6;

// 游戏状态枚举
const GameState = Define.GameState || (Define.GameState = {});
GameState[GameState.PREPARE = 0] = "PREPARE";
GameState[GameState.PLAYING = 1] = "PLAYING";
GameState[GameState.PAUSE = 2] = "PAUSE";
GameState[GameState.WIN = 3] = "WIN";
GameState[GameState.FAIL = 4] = "FAIL";

// 关卡类型枚举
const LevelType = Define.LevelType || (Define.LevelType = {});
LevelType[LevelType.NORMAL = 0] = "NORMAL";
LevelType[LevelType.CHALLENGE = 1] = "CHALLENGE";
LevelType[LevelType.SPECIAL = 2] = "SPECIAL";

// 格子类型枚举
const LatticeType = Define.LatticeType || (Define.LatticeType = {});
LatticeType[LatticeType.NORMAL = 0] = "NORMAL";
LatticeType[LatticeType.NULL = 1] = "NULL";
LatticeType[LatticeType.SINGLE = 2] = "SINGLE";
LatticeType[LatticeType.VIDEO = 3] = "VIDEO";
LatticeType[LatticeType.LOCK = 4] = "LOCK";

// 格子位置类型枚举
const LatticePosType = Define.LatticePosType || (Define.LatticePosType = {});
LatticePosType[LatticePosType.LEFT = 0] = "LEFT";
LatticePosType[LatticePosType.CENTER = 1] = "CENTER";
LatticePosType[LatticePosType.RIGHT = 2] = "RIGHT";

// 格子状态枚举
const LatticeState = Define.LatticeState || (Define.LatticeState = {});
LatticeState[LatticeState.PROGRESS = 0] = "PROGRESS";
LatticeState[LatticeState.COMPLETED = 1] = "COMPLETED";
LatticeState[LatticeState.NULL = 2] = "NULL";

// 元素显示类型枚举
const ElementShowType = Define.ElementShowType || (Define.ElementShowType = {});
ElementShowType[ElementShowType.ACTIVE = 0] = "ACTIVE";
ElementShowType[ElementShowType.GRAY = 1] = "GRAY";
ElementShowType[ElementShowType.HIDE = 2] = "HIDE";

// 奖励类型枚举
const AwardType = Define.AwardType || (Define.AwardType = {});
AwardType[AwardType.LEVEL = 0] = "LEVEL";
AwardType[AwardType.CHALLENGE = 1] = "CHALLENGE";
AwardType[AwardType.SPECIAL = 2] = "SPECIAL";
AwardType[AwardType.STAR = 3] = "STAR";

// 触摸相关配置
Define.TOUCH_MOVE_LIMIT = 10;
Define.FINGER_OFFSET = 0;
Define.CHALLENGE_DATE_SIGN = 1699941588208;

// 排名ID枚举
const RANK_ID = Define.RANK_ID || (Define.RANK_ID = {});
RANK_ID[RANK_ID.TODAY = 33] = "TODAY";
RANK_ID[RANK_ID.YESTERDAY = 34] = "YESTERDAY";
RANK_ID[RANK_ID.WEEKLY = 31] = "WEEKLY";
RANK_ID[RANK_ID.LASTWEEK = 32] = "LASTWEEK";
RANK_ID[RANK_ID.MEDAL = 35] = "MEDAL";

// 分享位置枚举
const SHARE_LOCATION = Define.SHARE_LOCATION || (Define.SHARE_LOCATION = {});
SHARE_LOCATION.LOGIN = "login";
SHARE_LOCATION.RESULT = "result";
SHARE_LOCATION.RANK = "rank";
SHARE_LOCATION.HOME = "home";
SHARE_LOCATION.INVITE = "invite";
SHARE_LOCATION.REWARD = "reward";

// GameEvent模块
const GameEvent = exports.GameEvent || (exports.GameEvent = {});
GameEvent.ADD_STAR_NUM = Define.GAME_NAME + "_ADD_STAR_NUM";
GameEvent.CHANGE_PROP_NUM = Define.GAME_NAME + "_CHANGE_PROP_NUM";
GameEvent.CHANGE_AWARD_NUM = Define.GAME_NAME + "_CHANGE_AWARD_NUM";
GameEvent.CHANGE_STAR_BOX = Define.GAME_NAME + "_CHANGE_STAR_BOX";
GameEvent.ON_COIN_CHANGE = Define.GAME_NAME + "_ON_COIN_CHANGE";
GameEvent.ON_GAME_PAUSE = Define.GAME_NAME + "_ON_GAME_PAUSE";
GameEvent.ON_GAME_RESUME = Define.GAME_NAME + "_ON_GAME_RESUME";
GameEvent.CHANGE_SHOP_USE = Define.GAME_NAME + "_CHANGE_SHOP_USE";
GameEvent.CHANGE_SPECIAL_AWARD = Define.GAME_NAME + "_CHANGE_SPECIAL_AWARD";
GameEvent.ON_VIT_CHANGE = Define.GAME_NAME + "_ON_VIT_CHANGE";
GameEvent.ONLINE_GIFT_UNLOCK = Define.GAME_NAME + "_ONLINE_GIFT_UNLOCK";
GameEvent.ON_BANK_MONEY_CHANGE = Define.GAME_NAME + "_ON_BANK_MONEY_CHANGE";
GameEvent.ON_MISSION_CHANGE = Define.GAME_NAME + "_ON_MISSION_CHANGE";
GameEvent.ON_GAME_CLUB_HIDE = Define.GAME_NAME + "_ON_GAME_CLUB_HIDE";
GameEvent.ON_FREE_COIN_RECIEVE = Define.GAME_NAME + "_ON_FREE_COIN_RECIEVE";
GameEvent.REFRESH_EMAIL_LIST = Define.GAME_NAME + "_REFRESH_EMAIL_LIST";
GameEvent.ON_NOADS_CHANGE = Define.GAME_NAME + "_ON_NOADS_CHANGE";
GameEvent.ON_VIP_CHANGE = Define.GAME_NAME + "_ON_VIP_CHANGE";
GameEvent.ON_PAY_SUCCESS = Define.GAME_NAME + "_ON_PAY_SUCCESS";
GameEvent.ON_FEED_BACK_HIDE = Define.GAME_NAME + "_ON_FEED_BACK_HIDE";
GameEvent.REFRESH_INVITE_LIST = Define.GAME_NAME + "_REFRESH_INVITE_LIST";
GameEvent.ON_DAILY_SHARE_REFRESH = Define.GAME_NAME + "_ON_DAILY_SHARE_REFRESH";
GameEvent.ON_SUBSCRIBE_REFRESH = Define.GAME_NAME + "_ON_SUBSCRIBE_REFRESH";
GameEvent.ON_GAME_CLUB_REFRESH = Define.GAME_NAME + "_ON_GAME_CLUB_REFRESH";
GameEvent.ON_SWITCH_PAGE = Define.GAME_NAME + "_ON_SWITCH_PAGE";
GameEvent.ON_GAME_THEME_CHANGE = Define.GAME_NAME + "_ON_GAME_THEME_CHANGE";